/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86183
 * Date: 2024-01-24
 * Time: 19:35
 */
public class Testr2 {
    public void fun(int[] array){
        int left=0;
        int right=array.length;
        while(left<right){
            int minIndex=left;
            int maxIndex=left;
            int i=0;
            for (i = left+1; i <=right ; i++) {
                if(array[i]<array[minIndex]){
                    minIndex=i;
                }
                if(array[i]>array[maxIndex]){
                    maxIndex=i;

                }

            }
            swap(array,left,minIndex);
            swap(array,right,maxIndex);
            left++;
            right-- ;

        }
    }
    public void swap(int[] array,int i,int j){

    }
    public static void main(String[] args) {

    }
}
